#-*- coding: utf8 -*-
from tutor.scripts import *
from tutor.plugins.sympy import *

while True:
    with display_block('Entradas'):
        a = rnumber(3)
        b = rnumber(3)
        func = x * exp(b * y)
        pto = (a, 0)

    with display_block('Resultados'):
        correta = x + b * x * y + a * b ** 2 * y ** 2 / 2
        origem = x + b * x * y
        distr1 = x + a * x * y
        distr2 = x + b * x * y + x * b ** 2 * y ** 2 / 2
        distr3 = x + b * a * y + a * b ** 2 * y ** 2 / 2
        distr4 = x - a + b * x * y - b * a * y

        if len(set([correta, origem, distr1, distr2, distr3, distr4])) != 6:
            continue
        else:
            break
